<template>
  <div class="pageBox">
     <button @click="toggerPage(sb)" v-for="sb in page" :key="sb">{{sb}}</button>
  </div>
</template>

<script>
export default {
  props: {
    page:{
      type:Number,
      default:0
    }
  },
  methods:{
    toggerPage(page){
      this.$emit('toggerPage', page);
    }
  }
}
</script>

<style lang="less">
  .pageBox{
    width: 50%;
    height: 40px;
    // background: red;
    display: flex;
    button{
      width: 10%;
      border: none;
      border-radius: 5px;
      background: rgb(51, 42, 65);
      color: #fff;
     cursor: pointer;
     margin-left: 10px;
    }
  }
</style>